<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <!-- 引入 css -->
    <link href="/admin/plugin/wangEditor/style.css" rel="stylesheet">
    <!-- 引入 js -->
    <script src="/admin/plugin/wangEditor/index.js"></script>

    <!--引入 element-ui 的样式，-->
    <link rel="stylesheet" href="/admin/plugin/element-ui/index.css">
    <!-- 必须先引入vue，  后使用element-ui -->
    <script type="text/javascript" src="/admin/js-css/js/vue.min.js"></script>
    <!-- 引入element 的组件库-->
    <script type="text/javascript" src="/admin/plugin/element-ui/index.js"></script>

    <script type="text/javascript" src="/admin/plugin/element-ui/httpVueLoader.js"></script>

    <script type="text/javascript" src="/admin/js-css/js/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="/admin/js-css/js/mx1.0.js?v=1.1"></script>
	<link rel="stylesheet" href="/admin/js-css/css/backColor.css" media="all">


    <!--    引入Layui组件-->
    <link rel="stylesheet" href="/admin/plugin/layui/dist/css/layui.css" tppabs="http://res.layui.com/layui/dist/css/layui.css"  media="all">
    <script src="/admin/plugin/layui/dist/layui.js" charset="utf-8"></script>

    <link rel="stylesheet" href="/admin/js-css/css/pageLR.css">


</head>
<body>
    <div id="app">
        <el-tabs v-model="activeName" @tab-click="handleClick" >
            <el-tab-pane label="基本信息" name="1" >
                <div>
                    <iframe :src="src1" frameborder="0" name="s1" style="scrollbar-width: none;" width="100%" :height="iframeHeight"></iframe>
                </div>
            </el-tab-pane>

            <el-tab-pane label="扫描件" name="2"  >
                <div>
                    <iframe :src="src2" frameborder="0" style="scrollbar-width: none;" width="100%" :height="iframeHeight"></iframe>
                </div>
            </el-tab-pane>

        </el-tabs>
    </div>
</body>

<script>
    var vm = new Vue({
        el:"#app",
        data:{
            tableId:getTableId("784"),
            activeName:"1",
            searchParmsData:{},
            src1:"",
            src2:"",
            code:"",
            baseObj:{},
            iframeHeight:0,
        },
        async created(){
            this.iframeHeight = top.document.body.clientHeight - 220;
            this.searchParmsData = getParams();
            await this.getBaseData();
            top.data.zygl_id = this.tableId;
            top.data.tableId = this.tableId;
            this.src1 = "/admin/html/module/sichuangwuye/hetong/baseInput.html";
        },
        methods:{
            async getBaseData(){
                const res = await postWebCustom(getTableId("788"),{id:this.searchParmsData.id});
                this.baseObj = res.data;
                this.src2 = this.baseObj.basedata.atth_path;
            },
            handleClick(tab, event) {
                if(this.activeName == "1"){
                    top.data.zygl_id = this.tableId;
                    top.data.tableId = this.tableId;
                    this.src1 = "/admin/html/module/sichuangwuye/hetong/baseInput.html";
                }
            }
        }
    });


    function setData(data) {
        if(Object.keys(data).length > 0){
            vm.baseObj = data;
        }

    }
</script>
</html>